﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnovTech.Util.Persistence.Database
{
    public abstract class DatabaseGeneratorBase<TDatabaseInfo> : IDatabaseGenerator<TDatabaseInfo>
        where TDatabaseInfo : IDatabaseInfo
    {
        protected abstract void CreateDatabase(TDatabaseInfo info);
        protected abstract TDatabaseInfo GetDatabaseInfo();

        public TDatabaseInfo GenerateDatabase()
        {
            TDatabaseInfo currentDatabasePath = GetDatabaseInfo();
            CreateDatabase(currentDatabasePath);
            return currentDatabasePath;
        }
    }
}
